<?php

namespace app\admin\controller;

use app\admin\common\Adminbase;
use service\TreeService;
use think\Db;
use app\admin\model\Visitor as Visitormodel;

class Visitor extends Adminbase
{
    protected $visitormodel;

    protected function _initialize(){
        parent::_initialize();
        $this->visitormodel = new Visitormodel();
    }

    public function index(){
        if($this->request->isAjax()) {
            $param = $this->request->param();//接收参数
            //dump($param);exit;
            /**
             * 返回获取的分页数据
             */
            return $this->visitormodel->GetVisitorsDataPage($param);
        }
        return $this->fetch();
    }
}

